<div class="invoice p-1 mb-3">
    <div class="row invoice-info">
        <div class="col-sm-12 invoice-col mt-1">
            <b>补货单号：</b> {{ $order_info -> replenishment_no }}
        </div>
        <div class="col-sm-6 invoice-col mt-1">
            <b>设备：</b> {{ $order_info -> machine_name }}
        </div>
        <div class="col-sm-6 invoice-col mt-1">
            <b>状态：</b> <span class="label" style="{{$order_info->color}}">{{ $order_info -> replenishment_status_word }}</span>
        </div>
        <div class="col-sm-6 invoice-col mt-1">
            <b>总成本：</b> ￥{{ $order_info -> cost_prices }}
        </div>
        <div class="col-sm-6 invoice-col mt-1">
            <b>补货时间：</b> {{ $order_info -> replenishment_time }}
        </div>
        <div class="col-sm-6 invoice-col mt-1">
            <b>补货员：</b> {{ $order_info -> operator_name }}
        </div>
    </div>
    <div class="row mt-3">
        <div class="col-12 table-responsive">
            <table class="table table-striped center">
                <thead>
                <tr>
                    <th>#</th>
                    <th>商品名称</th>
                    <th>库存总计</th>
                    <th>成本价</th>
                    <th>计划补货数量</th>
                    <th>实际补货数量</th>
                </tr>
                </thead>
                <tbody>
                @foreach($order_info -> goods as $goods)
                    <tr>
                        <td>{{ $goods['id'] }}</td>
                        <td>{{ $goods['goods_name'] }}</td>
                        <td>{{ $goods['goods_quantity'] }}</td>
                        <td>{{ $goods['cost_price'] }}</td>
                        <td>{{ $goods['replenishment_quantity'] }}</td>
                        <td>{{ $goods['actual_quantity']  != 0 ? $goods['actual_quantity'] : '0'}}</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>
    </div>
    @if($order_info->replenishment_status == 1)
    <div class="row invoice-info">
        <div class="col-sm-12 invoice-col mt-1">
            <b>出库照片记录:</b>  <img data-action="preview-img" src="{{ $order_info -> leave_image }}" style="max-width:600px;max-height:360px;cursor:pointer" class="img img-thumbnail">
        </div>
    </div>
    @endif
    @if($order_info->replenishment_status == 2)
        <div class="row invoice-info">
            <div class="col-sm-12 invoice-col mt-1">
                <b>出库照片记录:</b>  <img data-action="preview-img" src="{{ $order_info -> leave_image }}" style="max-width:600px;max-height:360px;cursor:pointer" class="img img-thumbnail">
            </div>
        </div>
        <div class="row invoice-info">
            <div class="col-sm-12 invoice-col mt-1">
                <b>回库照片记录:</b>  <img data-action="preview-img" src="{{ $order_info -> back_image }}" style="max-width:600px;max-height:360px;cursor:pointer" class="img img-thumbnail">
            </div>
        </div>
    @endif
</div>
